#ifndef WATCH_H
#define WATCH_H

#include <QWidget>
#include "klinewidget.h"

namespace Ui {
class Watch;
}

class Watch : public QWidget
{
    Q_OBJECT

public:
    explicit Watch(QWidget *parent = nullptr);
    ~Watch();

private:
    Ui::Watch *ui;
private slots:
    void setIndicatorMode(int index) {
            switch (index) {
            case 0: // 所有指标
                klineWidget->setShowMA5(true);
                klineWidget->setShowMA10(true);
                klineWidget->setShowMA20(true);
                klineWidget->setShowVolume(true);
                klineWidget->setShowVolumeMA5(true);
                break;
            case 1: // 仅K线
                klineWidget->setShowMA5(false);
                klineWidget->setShowMA10(false);
                klineWidget->setShowMA20(false);
                klineWidget->setShowVolume(false);
                klineWidget->setShowVolumeMA5(false);
                break;
            case 2: // 仅均线
                klineWidget->setShowMA5(true);
                klineWidget->setShowMA10(true);
                klineWidget->setShowMA20(true);
                klineWidget->setShowVolume(false);
                klineWidget->setShowVolumeMA5(false);
                break;
            case 3: // 仅成交量
                klineWidget->setShowMA5(false);
                klineWidget->setShowMA10(false);
                klineWidget->setShowMA20(false);
                klineWidget->setShowVolume(true);
                klineWidget->setShowVolumeMA5(true);
                break;
            }
        }

    private:
        KLineWidget *klineWidget=nullptr;
};

#endif // WATCH_H
